<?php
/*
 * File Transactie.php for project Rijlesplanner.nl
 * Created on Feb 3, 2008 at 8:48:27 PM by Ivar Pruijn
 */
 
 
class Transactie {
  
	// Properties:
	private $Id;
	private $VanType;
	private $VanId;
	private $NaarType;
	private $NaarId;
	private $Bedrag;
	private $Kostenplaats;
	private $Datum;
	private $Omschrijving;

	// Methods:

	/**
	 * void __construct ()
	 * This is the constructor method for the User class.
	 */
	public function __construct() {
   	}
   	
   	public function Transactie(array $atts=NULL) {
		$this->ConstructFromArray($atts);
	}
	
	public function getId() {
	  return $this->Id;
	}

	public function setId($newVal) {
		$this->Id = $newVal;
	}

	public function getVanType() {
	  return $this->VanType;
	}

	public function setVanType($newVal) {
		$this->VanType = $newVal;
	}

	public function getVanId() {
	  return $this->VanId;
	}

	public function setVanId($newVal) {
		$this->VanId = $newVal;
	}

	public function getNaarType() {
	  return $this->NaarType;
	}

	public function setNaarType($newVal) {
		$this->NaarType = $newVal;
	}

	public function getNaarId() {
	  return $this->NaarId;
	}

	public function setNaarId($newVal) {
		$this->NaarId = $newVal;
	}

	public function getBedrag() {
	  return $this->Bedrag;
	}

	public function setBedrag($newVal) {
		$this->Bedrag = $newVal;
	}

	public function getKostenplaats() {
	  return $this->Kostenplaats;
	}

	public function setKostenplaats($newVal) {
		$this->Kostenplaats = $newVal;
	}

	public function getDatum() {
	  return $this->Datum;
	}

	public function setDatum($newVal) {
		$this->Datum = $newVal;
	}

	public function getOmschrijving() {
	  return $this->Omschrijving;
	}

	public function setOmschrijving($newVal) {
		$this->Omschrijving = $newVal;
	}

	/**
	 * void ConstructFromArray ([array attributes])
	 * This method, if an array is given as the argument, will
	 * create properties in the current object named after the
	 * keys of the array, and set the properties to the corresponding
	 * values from the array.
	 */
	private function ConstructFromArray (array $atts=NULL) {
		if (is_array($atts)) {
			while (list($key, $value) = each($atts)) {
				$this->$key = $value;
			}
		}
	}

	public function __destruct() {
//		global $logger;
//    	$logger->log("Destroying transactie " . $this->__toString() . "!\n",PEAR_LOG_INFO);
   	}
   	
   	public function __toString() {
        return $this->VanType ."->".$this->NaarType." (".$this->Bedrag.")";
    }
}
?>